load("//bazel:api.bzl", "modular_py_binary", "modular_run_binary_test")

modular_py_binary(
    name = "hello",
    srcs = ["hello.py"],
    data = ["hello_mojo.mojo"],
    target_compatible_with = select({
        "//:asan": ["@platforms//:incompatible"],
        "//:ubsan": ["@platforms//:incompatible"],
        "//conditions:default": [],
    }),
    deps = [
        "@mojo//:python",
    ],
)

modular_py_binary(
    name = "person",
    srcs = ["person.py"],
    data = ["person_module.mojo"],
    target_compatible_with = select({
        "//:asan": ["@platforms//:incompatible"],
        "//:ubsan": ["@platforms//:incompatible"],
        "//conditions:default": [],
    }),
    deps = [
        "@mojo//:python",
    ],
)

modular_py_binary(
    name = "mandelbrot",
    srcs = ["mandelbrot.py"],
    data = ["mandelbrot_mojo.mojo"],
    mojo_deps = [
        "//max:layout",
    ],
    target_compatible_with = ["//:has_gpu"],
    deps = [
        "@mojo//:python",
    ],
)

modular_run_binary_test(
    name = "hello_test",
    binary = "hello",
)

modular_run_binary_test(
    name = "person_test",
    binary = "person",
)

modular_run_binary_test(
    name = "mandelbrot_test",
    binary = "mandelbrot",
)
